package com.eastfair.imaster.service;

import com.eastfair.auth.vo.UserAccountVo;
import com.eastfair.boot.service.SuperService;
import com.eastfair.core.base.R;
import com.eastfair.imaster.dto.BusinResourceDTO;
import com.eastfair.imaster.entity.BusinResource;
import com.eastfair.imaster.vo.BusinResourceVO;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 业务资源表
 * </p>
 *
 * @author ligang
 * @date 2022-01-20
 */
public interface BusinResourceService extends SuperService<BusinResource> {

    /**
     * 添加
     *
     * @param businResourceDTO
     * @return
     */
    BusinResourceVO executeSave(BusinResourceDTO businResourceDTO);

    /**
     * 修改
     *
     * @param businResourceDTO
     * @return
     */
    BusinResourceVO executeUpdate(BusinResourceDTO businResourceDTO);

    /**
     * 组装信息
     */
    void assembleBusinResourceList(List<BusinResourceVO> businResourceVOList);

    /**
     * 查询的单个实体
     *
     * @param id
     * @return
     */
    BusinResourceVO findById(Long id);

    /**
     * 查询
     *
     * @param businResourceDTO
     * @return
     */
    List<BusinResourceVO> queryList(BusinResourceDTO businResourceDTO);

    /**
     * list查询
     *
     * @param businResource
     * @param ids
     * @return
     */
    List<BusinResource> listOfBusinResource(BusinResource businResource, List<Long> ids);

    /**
     * 审核资源
     *
     * @param ids     资源id集合
     * @param isCheck 是否通过 true通过，false不通过
     */
    void checkResource(List<Long> ids, Boolean isCheck);


    /**
     * 审核资源
     *
     * @param ids     资源id集合
     * @param isShelves 是否上架 true上架，false下架
     */
    void upResource(List<Long> ids,Integer isShelves);
}
